<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="Java">
    <meta name="description" content="学习记录">
    <meta name="author" content="Carry灭霸">
    
    <title>
        
            Gitee+PicGo图床搭建 |
        
        Carry
    </title>
    
<link rel="stylesheet" href="/css/style.css">

    <link rel="shortcut icon" href="/images/logo.svg">
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/css/font-awesome.min.css">
    <script id="hexo-configurations">
    let KEEP = window.KEEP || {};
    KEEP.hexo_config = {"hostname":"example.com","root":"/","language":"zh-CN","path":"search.xml"};
    KEEP.theme_config = {"toc":{"enable":true,"number":false,"expand_all":true,"init_open":true},"style":{"primary_color":"#0066CC","avatar":"/images/avatar.svg","favicon":"/images/logo.svg","article_img_align":"center","left_side_width":"260px","content_max_width":"920px","hover":{"shadow":false,"scale":false},"first_screen":{"enable":true,"background_img":"/images/bg.svg","description":"Hello World!"},"scroll":{"progress_bar":{"enable":true},"percent":{"enable":true}}},"local_search":{"enable":true,"preload":true},"code_copy":{"enable":true,"style":"default"},"pjax":{"enable":false},"lazyload":{"enable":false},"version":"3.4.3"};
    KEEP.language_ago = {"second":"%s 秒前","minute":"%s 分钟前","hour":"%s 小时前","day":"%s 天前","week":"%s 周前","month":"%s 月前","year":"%s 年前"};
  </script>
<meta name="generator" content="Hexo 5.4.0"></head>


<body>
<div class="progress-bar-container">
    
        <span class="scroll-progress-bar"></span>
    

    
</div>


<main class="page-container">

    

    <div class="page-main-content">

        <div class="page-main-content-top">
            <header class="header-wrapper">

    <div class="header-content">
        <div class="left">
            
            <a class="logo-title" href="/">
                Carry
            </a>
        </div>

        <div class="right">
            <div class="pc">
                <ul class="menu-list">
                    
                        <li class="menu-item">
                            <a class=""
                               href="/"
                            >
                                首页
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/archives"
                            >
                                归档
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/categories"
                            >
                                分类
                            </a>
                        </li>
                    
                        <li class="menu-item">
                            <a class=""
                               href="/tags"
                            >
                                标签
                            </a>
                        </li>
                    
                    
                        <li class="menu-item search search-popup-trigger">
                            <i class="fas fa-search"></i>
                        </li>
                    
                </ul>
            </div>
            <div class="mobile">
                
                    <div class="icon-item search search-popup-trigger"><i class="fas fa-search"></i></div>
                
                <div class="icon-item menu-bar">
                    <div class="menu-bar-middle"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="header-drawer">
        <ul class="drawer-menu-list">
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/">首页</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/archives">归档</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/categories">分类</a>
                </li>
            
                <li class="drawer-menu-item flex-center">
                    <a class=""
                       href="/tags">标签</a>
                </li>
            
        </ul>
    </div>

    <div class="window-mask"></div>

</header>


        </div>

        <div class="page-main-content-middle">

            <div class="main-content">

                
                    <div class="fade-in-down-animation">
    <div class="article-content-container">

        <div class="article-title">
            <span class="title-hover-animation">Gitee+PicGo图床搭建</span>
        </div>

        
            <div class="article-header">
                <div class="avatar">
                    <img src="/images/avatar.svg">
                </div>
                <div class="info">
                    <div class="author">
                        <span class="name">Carry灭霸</span>
                        
                            <span class="author-label">Lv4</span>
                        
                    </div>
                    <div class="meta-info">
                        <div class="article-meta-info">
    <span class="article-date article-meta-item">
        <i class="fas fa-edit"></i>&nbsp;2021-08-10 00:00:00
    </span>
    
        <span class="article-categories article-meta-item">
            <i class="fas fa-folder"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/categories/%E5%9B%BE%E5%BA%8A/">图床</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    
    
        <span class="article-tags article-meta-item">
            <i class="fas fa-tags"></i>&nbsp;
            <ul>
                
                    <li>
                        <a href="/tags/%E5%9B%BE%E5%BA%8A/">图床</a>&nbsp;
                    </li>
                
                    <li>
                        | <a href="/tags/Gitee/">Gitee</a>&nbsp;
                    </li>
                
            </ul>
        </span>
    

    
    
    
    
        <span class="article-pv article-meta-item">
            <i class="fas fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
        </span>
    
</div>

                    </div>
                </div>
            </div>
        

        <div class="article-content markdown-body">
            <h1 id="Gitee-PicGo图床搭建"><a href="#Gitee-PicGo图床搭建" class="headerlink" title="Gitee+PicGo图床搭建"></a>Gitee+PicGo图床搭建</h1><h2 id="工具"><a href="#工具" class="headerlink" title="工具"></a>工具</h2><ol>
<li><a class="link"   target="_blank" rel="noopener" href="https://github.com/Molunerfinn/PicGo/releases" >PicGo<i class="fas fa-external-link-alt"></i></a>(请确保你安装了 Node.js， 并且版本 &gt;= 8)</li>
<li><a class="link"   target="_blank" rel="noopener" href="https://www.typora.io/" >Typora<i class="fas fa-external-link-alt"></i></a></li>
</ol>
<p><a class="link"   target="_blank" rel="noopener" href="https://picgo.github.io/PicGo-Doc/zh/guide/getting-started.html" >PicGo使用文档<i class="fas fa-external-link-alt"></i></a></p>
<p>安装上面两个软件</p>
<h2 id="PicGo配置Gitee"><a href="#PicGo配置Gitee" class="headerlink" title="PicGo配置Gitee"></a>PicGo配置Gitee</h2><ol>
<li>打开安装好的PicGo</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424000121069.png" alt="image-20210424000121069"></p>
<p>2.选择插件设置，搜索gitee</p>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424000506412.png" alt="image-20210424000506412"></p>
<p>3.选择gitee-uploader插件，安装</p>
<p>4.建立<a class="link"   target="_blank" rel="noopener" href="https://gitee.com/" >gitee<i class="fas fa-external-link-alt"></i></a>图床库</p>
<p>如果没gitee账号，注册一个</p>
<ul>
<li>新建仓库</li>
</ul>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424001147170.png" alt="image-20210424001147170"></p>
<ul>
<li>仓库创建过程，最后点击创建</li>
</ul>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424001501132.png" alt="image-20210424001501132"></p>
<p>5.生成Gitee的token</p>
<ul>
<li>打开设置</li>
</ul>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424001927167.png" alt="image-20210424001927167"></p>
<ul>
<li>选择私人令牌</li>
</ul>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424002003827.png" alt="image-20210424002003827"></p>
<ul>
<li><p>点击生成新令牌，把<strong>projects</strong>这一项勾上，其他的不用勾，然后提交，会生成一个token，复制到笔记中，记录下来</p>
<blockquote>
<p>注意：这个令牌只会明文显示一次，建议在配置插件的时候再来生成令牌，复制保存起来</p>
</blockquote>
</li>
</ul>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424002151914.png" alt="image-20210424002151914"></p>
<ol start="6">
<li>配置PicGo</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424002655410.png" alt="image-20210424002655410"></p>
<ul>
<li><p>repo：用户名/仓库名称，比如仓库carrywl/image-hosting，找不到的可以直接复制仓库的url</p>
</li>
<li><p>branch：分支，这里写上master</p>
</li>
<li><p>token：填入生成的私人令牌</p>
</li>
<li><p>path：存储图片的路径，一般写上img</p>
</li>
<li><p>customPath：提交消息，这一项和下一项customURL都不用填。在提交到码云后，会显示提交消息，插件默认提交的是 <code>Upload 图片名 by picGo - 时间</code></p>
</li>
</ul>
<h2 id="测试"><a href="#测试" class="headerlink" title="测试"></a>测试</h2><ol>
<li>打开Typora</li>
<li>文件==偏好设置==图像</li>
<li>在上传图像设置PicGo</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424004444021.png" alt="image-20210424004444021"></p>
<ol start="4">
<li>点击验证图片上传</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210424003656340.png" alt="image-20210424003656340"></p>
<p>截图粘贴到Typora时，图片会被默认存到C盘，可以定时清理：C:\Users\你电脑的用户名\AppData\Roaming\Typora\typora-user-images</p>
<h2 id="异常处理"><a href="#异常处理" class="headerlink" title="异常处理"></a>异常处理</h2><p>设置好粘贴图片自动上传，报错，不能上传到图床</p>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810163655125.png" alt="image-20210810163655125"></p>
<ol>
<li>文件-&gt;偏好设置-&gt;图像-&gt;验证图片上传选项</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810163801886.png" alt="image-20210810163801886"></p>
<ol start="2">
<li>查看端口</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810163915465.png" alt="image-20210810163915465"></p>
<ol start="3">
<li>打开配置文件</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810164017648.png" alt="image-20210810164017648"></p>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810164052007.png" alt="image-20210810164052007"></p>
<ol start="4">
<li>设置Server</li>
</ol>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810164128952.png" alt="image-20210810164128952"></p>
<p><img src="https://gitee.com/carrywl/image-hosting/raw/master/image-codeStudy/image-20210810164150659.png" alt="image-20210810164150659"></p>
<ol start="5">
<li>设置Server 、文件配置、验证上传图片三个地方的端口要保持一致</li>
</ol>
<blockquote>
<p>参考文章：<a class="link"   target="_blank" rel="noopener" href="https://blog.csdn.net/disILLL/article/details/103962241" >https://blog.csdn.net/disILLL/article/details/103962241<i class="fas fa-external-link-alt"></i></a></p>
</blockquote>

        </div>

        
            <div class="post-copyright-info">
                <div class="article-copyright-info-container">
    <ul>
        <li>本文标题：Gitee+PicGo图床搭建</li>
        <li>本文作者：Carry灭霸</li>
        <li>创建时间：2021-08-10 00:00:00</li>
        <li>
            本文链接：https://carrywl.gitee.io/2021/08/10/Gitee+PicGo图床搭建/
        </li>
        <li>
            版权声明：本博客所有文章除特别声明外，均采用 <a class="license" target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">BY-NC-SA</a> 许可协议。转载请注明出处！
        </li>
    </ul>
</div>

            </div>
        

        
            <div class="article-nav">
                
                    <div class="article-prev">
                        <a class="prev"
                           rel="prev"
                           href="/2021/08/12/%E8%B0%B7%E7%B2%92%E5%95%86%E5%9F%8E/"
                        >
                            <span class="left arrow-icon flex-center">
                              <i class="fas fa-chevron-left"></i>
                            </span>
                            <span class="title flex-center">
                                <span class="post-nav-title-item">谷粒商城</span>
                                <span class="post-nav-item">上一篇</span>
                            </span>
                        </a>
                    </div>
                
                
                    <div class="article-next">
                        <a class="next"
                           rel="next"
                           href="/2021/08/10/Optional-in-Java/"
                        >
                            <span class="title flex-center">
                                <span class="post-nav-title-item">Optional in Java</span>
                                <span class="post-nav-item">下一篇</span>
                            </span>
                            <span class="right arrow-icon flex-center">
                              <i class="fas fa-chevron-right"></i>
                            </span>
                        </a>
                    </div>
                
            </div>
        

        
            <div class="comment-container">
                <div class="comments-container">
    <div id="comment-anchor"></div>
    <div class="comment-area-title">
        <i class="fas fa-comments">&nbsp;评论</i>
    </div>
    

        
            
    <div class="valine-container">
        <script 
                src="//cdn.jsdelivr.net/npm/valine@latest/dist/Valine.min.js"></script>
        <div id="vcomments"></div>
        <script >
            function loadValine() {
                new Valine({
                    el: '#vcomments',
                    appId: 'GWXViL9oMzuvk5GoEyorAF5a-gzGzoHsz',
                    appKey: 'tfCnOVhjkUjT90W8EGLYvf0v',
                    meta: ['nick', 'mail', 'link'],
                    avatar: 'wavatar',
                    enableQQ: true,
                    placeholder: '😜 尽情吐槽吧~',
                    lang: 'zh-CN'.toLowerCase()
                });

                function getAuthor(language) {
                    switch (language) {
                        case 'en':
                            return 'Author';
                        case 'zh-CN':
                            return '博主';
                        default:
                            return 'Master';
                    }
                }

                // Add "Author" identify
                const getValineDomTimer = setInterval(() => {
                    const vcards = document.querySelectorAll('#vcomments .vcards .vcard');
                    if (vcards.length > 0) {
                        let author = 'Carry灭霸';

                        if (author) {
                            for (let vcard of vcards) {
                                const vnick_dom = vcard.querySelector('.vhead .vnick');
                                const vnick = vnick_dom.innerHTML;
                                if (vnick === author) {
                                    vnick_dom.innerHTML = `${vnick} <span class="author">${getAuthor(KEEP.hexo_config.language)}</span>`
                                }
                            }
                        }
                        clearInterval(getValineDomTimer);
                    } else {
                        clearInterval(getValineDomTimer);
                    }
                }, 2000);
            }

            if ('false') {
                const loadValineTimeout = setTimeout(() => {
                    loadValine();
                    clearTimeout(loadValineTimeout);
                }, 1000);
            } else {
                window.addEventListener('DOMContentLoaded', loadValine);
            }
        </script>
    </div>



        
    
</div>

            </div>
        
    </div>
</div>


                
            </div>

        </div>

        <div class="page-main-content-bottom">
            <footer class="footer">
    <div class="info-container">
        <div class="copyright-info info-item">
            &copy;
            
              <span>2021</span>&nbsp;-&nbsp;
            
            2022&nbsp;<i class="fas fa-heart icon-animate"></i>&nbsp;<a href="/">Carry灭霸</a>
        </div>
        
            <script async  src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
            <div class="website-count info-item">
                
                
            </div>
        
        <div class="theme-info info-item">
            由 <a target="_blank" href="https://hexo.io">Hexo</a> 驱动&nbsp;|&nbsp;主题&nbsp;<a class="theme-version" target="_blank" href="https://github.com/XPoet/hexo-theme-keep">Keep v3.4.3</a>
        </div>
        
    </div>
</footer>

        </div>
    </div>

    
        <div class="post-tools">
            <div class="post-tools-container">
    <ul class="tools-list">
        <!-- TOC aside toggle -->
        
            <li class="tools-item page-aside-toggle">
                <i class="fas fa-outdent"></i>
            </li>
        

        <!-- go comment -->
        
            <li class="go-comment">
                <i class="fas fa-comment"></i>
            </li>
        
    </ul>
</div>

        </div>
    

    <div class="right-bottom-side-tools">
        <div class="side-tools-container">
    <ul class="side-tools-list">
        <li class="tools-item tool-font-adjust-plus flex-center">
            <i class="fas fa-search-plus"></i>
        </li>

        <li class="tools-item tool-font-adjust-minus flex-center">
            <i class="fas fa-search-minus"></i>
        </li>

        <li class="tools-item tool-expand-width flex-center">
            <i class="fas fa-arrows-alt-h"></i>
        </li>

        <li class="tools-item tool-dark-light-toggle flex-center">
            <i class="fas fa-moon"></i>
        </li>

        <!-- rss -->
        

        

        <li class="tools-item tool-scroll-to-bottom flex-center">
            <i class="fas fa-arrow-down"></i>
        </li>
    </ul>

    <ul class="exposed-tools-list">
        <li class="tools-item tool-toggle-show flex-center">
            <i class="fas fa-cog fa-spin"></i>
        </li>
        
            <li class="tools-item tool-scroll-to-top flex-center">
                <i class="arrow-up fas fa-arrow-up"></i>
                <span class="percent"></span>
            </li>
        
    </ul>
</div>

    </div>

    
        <aside class="page-aside">
            <div class="post-toc-wrap">
    <div class="post-toc">
        <ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Gitee-PicGo%E5%9B%BE%E5%BA%8A%E6%90%AD%E5%BB%BA"><span class="nav-text">Gitee+PicGo图床搭建</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%B7%A5%E5%85%B7"><span class="nav-text">工具</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#PicGo%E9%85%8D%E7%BD%AEGitee"><span class="nav-text">PicGo配置Gitee</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E6%B5%8B%E8%AF%95"><span class="nav-text">测试</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BC%82%E5%B8%B8%E5%A4%84%E7%90%86"><span class="nav-text">异常处理</span></a></li></ol></li></ol>
    </div>
</div>
        </aside>
    

    <div class="image-viewer-container">
    <img src="">
</div>


    
        <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
          <span class="search-input-field-pre">
            <i class="fas fa-keyboard"></i>
          </span>
            <div class="search-input-container">
                <input autocomplete="off"
                       autocorrect="off"
                       autocapitalize="off"
                       placeholder="搜索..."
                       spellcheck="false"
                       type="search"
                       class="search-input"
                >
            </div>
            <span class="popup-btn-close">
                <i class="fas fa-times"></i>
            </span>
        </div>
        <div id="search-result">
            <div id="no-result">
                <i class="fas fa-spinner fa-pulse fa-5x fa-fw"></i>
            </div>
        </div>
    </div>
</div>

    

</main>



<script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/utils.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/main.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/header-shrink.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/back2top.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/dark-light-toggle.js"></script>


    <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/local-search.js"></script>



    <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/code-copy.js"></script>




<div class="post-scripts">
    
        <script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/left-side-toggle.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/libs/anime.min.js"></script><script src="//cdn.jsdelivr.net/npm/hexo-theme-keep@3.4.3/source/js/toc.js"></script>
    
</div>



</body>
</html>
